package com.xdy.server.core2;

import java.util.HashSet;
import java.util.Set;

/**
 * @Author: XDY.
 * @Email: 2280944114@qq.com
 * @CreateTime: 2023-03-13  14:53
 * @Description: 配置文件servlet-mapping实体
 * @Version: 1.0
 */
public class MappingEntity {
    private String name;
    private Set<String> patterns = new HashSet<>();

    public MappingEntity(String name, Set<String> patterns) {
        this.name = name;
        this.patterns = patterns;
    }
    public MappingEntity() {
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public Set<String> getPatterns() {
        return patterns;
    }

    @Override
    public String toString() {
        return "MappingEntity{" +
                "name='" + name + '\'' +
                ", patterns=" + patterns +
                '}';
    }

    public void addPattern(String pattern){
        this.patterns.add(pattern);
    }
}
